package com.quantgroup.data.controller;

import com.quantgroup.data.entity.Result;
import com.quantgroup.data.service.AttributionDataService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

/**
 * @author osmondy
 * @create 2021/9/30 16:05
 */
@RestController
@RequestMapping("/attribution-data/realTimeData")
public class RealTimeDataController {
    @Resource
    AttributionDataService attributionDataService;

    /**
     * 激活
     */
    @GetMapping("/install")
    public Result install(@RequestParam Map<String, Object> params) {
        attributionDataService.saveRyOriginalData("install", params);
        return Result.success("install is OK!");
    }

    /**
     * 注册
     */
    @GetMapping("/reged")
    public Result reged(@RequestParam Map<String, Object> params) {
        attributionDataService.saveRyOriginalData("reged", params);
        return Result.success("reged is OK!");
    }

    /**
     * 登录
     */
    @GetMapping("/loggedin")
    public Result loggedin(@RequestParam Map<String, Object> params) {
        attributionDataService.saveRyOriginalData("loggedin", params);
        return Result.success("loggedin is OK!");
    }

}
